﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserView.master" AutoEventWireup="true"
    CodeBehind="PostNewListing.aspx.cs" Inherits="BestBuy.UserViews.PostNewListing" %>

<%@ Register TagPrefix="uc" TagName="SelectProductCategory" Src="~/UserControls/SelectProductCategory.ascx" %>
<%@ Register TagPrefix="uc" TagName="ProductDetail" Src="~/UserControls/ProductDetail.ascx" %>
<%@ Register TagPrefix="uc" TagName="PreviewProduct" Src="~/UserControls/PreviewProduct.ascx" %>

<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager runat="server" />
    <asp:UpdatePanel runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div style="padding: 20px;">
            <asp:Wizard ID="PostNewListingWizard" runat="server" OnActiveStepChanged="PostNewListingWizard_ActiveStepChanged"
                OnNextButtonClick="PostNewListingWizard_NextButtonClick" OnFinishButtonClick="PostNewListingWizard_FinishButtonClick">
                <LayoutTemplate>
                    <div>
                        <asp:PlaceHolder ID="sideBarPlaceHolder" runat="server" />
                    </div>
                    <div>
                        <asp:PlaceHolder ID="WizardStepPlaceHolder" runat="server" />
                    </div>
                    <div>
                        <asp:PlaceHolder ID="navigationPlaceHolder" runat="server" />
                    </div>
                </LayoutTemplate>
                <SideBarTemplate>
                    <asp:ListView ID="sideBarList" runat="server" OnItemDataBound="SideBar_ItemDataBound">
                        <LayoutTemplate>
                            <ul class="breadcrumbs-two">
                                <div id="ItemPlaceHolder" runat="server" />
                            </ul>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>
                                <asp:LinkButton ID="sideBarButton" runat="server" Text="Button" /></li>
                        </ItemTemplate>
                        <SelectedItemTemplate>
                            <li class="current">
                                <asp:LinkButton ID="sideBarButton" runat="server" Text="Button" /></li>
                        </SelectedItemTemplate>
                    </asp:ListView>
                </SideBarTemplate>
                <StartNavigationTemplate>
                    <asp:Button ID="StepNextButton" runat="server" CssClass="btn btn-primary" Text="Tiếp tục" CommandName="MoveNext" CausesValidation="true" ValidationGroup="SelectCategoryValidators" />
                </StartNavigationTemplate>
                <StepNavigationTemplate>
                    <asp:Button ID="StepPrevButton" runat="server" CssClass="btn" Text="Trở lại" CommandName="MovePrevious" />
                    <asp:Button ID="StepNextButton" runat="server" CssClass="btn btn-primary" Text="Tiếp tục"
                        CommandName="MoveNext" CausesValidation="true"/>
                </StepNavigationTemplate>
                <FinishNavigationTemplate>
                    <asp:Button ID="StepPrevButton" runat="server" CssClass="btn" Text="Trở lại" CommandName="MovePrevious" />
                    <asp:Button ID="StepNextButton" runat="server" CssClass="btn btn-primary" Text="Hoàn thành"
                        CommandName="MoveComplete" />
                </FinishNavigationTemplate>
                <WizardSteps>
                    <asp:WizardStep ID="SelectCategoryStep" runat="server" Title="Chọn danh mục sản phẩm">
                        <asp:ValidationSummary runat="server" ID="SelectCategoryValidateSummary" CssClass="alert alert-danger" ValidationGroup="SelectCategoryValidators" />
                        <asp:RequiredFieldValidator runat="server" ID="SelectCategoryRequired" ControlToValidate="SelectCategoryControl"
                            ValidationGroup="SelectCategoryValidators" CssClass="failureNotification" ErrorMessage="Chọn danh mục nhỏ nhất."
                            Display="None" />
                        <uc:SelectProductCategory runat="server" ID="SelectCategoryControl" />
                    </asp:WizardStep>
                    <asp:WizardStep ID="ProductDetailsStep" runat="server" Title="Thông tin chi tiết sản phẩm">
                        <uc:ProductDetail ID="ProductDetailControl" runat="server" />
                    </asp:WizardStep>
                    <asp:WizardStep ID="PreviewStep" runat="server" Title="Xem lại thông tin">
                        <uc:PreviewProduct ID="PreviewProductControl" runat="server" />
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
